﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using LiSA_Server.Base.NHibernate.Models;
using NHibernate;
using NHibernate.Mapping.ByCode.Conformist;

namespace LiSA_Service.ResearchProjects.Models
{
    [DataContract]
    public class ArticleFeedback : Entity
    {
        [DataMember]
        public virtual Guid ArticleID { get; set; }

        [DataMember]
        public virtual Guid ProjectID { get; set; }

        [DataMember]
        public virtual Guid ReviewerUserID { get; set; }

        [DataMember]
        public virtual int Stage { get; set; }

        [DataMember]
        public virtual string OptionSelected { get; set; }

        [DataMember]
        public virtual string Comment { get; set; }
    }

    /// <summary>
    /// The ArticleFeedback mapping.
    /// </summary>
    public class ArticleFeedbackMapping : ClassMapping<ArticleFeedback>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ArticleFeedbackMapping"/> class.
        /// </summary>
        public ArticleFeedbackMapping()
        {
            this.Property(x => x.ArticleID);
            this.Property(x => x.ProjectID);
            this.Property(x => x.ReviewerUserID);
            this.Property(x => x.Stage);
            this.Property(x => x.OptionSelected, x => x.Type(NHibernateUtil.StringClob));
            this.Property(x => x.Comment, x => x.Type(NHibernateUtil.StringClob));
        }
    }
}